package uxgenes.app;

import uxgenes.core.Logger;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

public class WallpaperPreferencesActivity 	extends PreferenceActivity
											implements OnSharedPreferenceChangeListener 
{
// constants //
	private static final String	TAG = "WallpaperPreferencesActivity";
    
    	
// methods //
		
	// onCreate
	@SuppressWarnings("deprecation")
	@Override
	protected final void onCreate (Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		addPreferencesFromResource( R.layout.wallpaper_preference );

	    SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
	    pref.registerOnSharedPreferenceChangeListener( this );
	    
	    Logger.I( TAG, "Start" );
	}


	// onSharedPreferenceChanged
	public void onSharedPreferenceChanged (SharedPreferences pref, String key)
	{
		Logger.I( TAG, "key " + key + " changed to " + pref.getString(key, "") );
	
		// TODO: add code here
	}

	// OnWallpaperCreated
	public static void OnWallpaperCreated (Context ctx)
	{
		Logger.I( TAG, "OnWallpaperCreated" );

		// TODO: add code here
	}
}
